


#ifndef PF_LINETYPEPATTERN_H
#define PF_LINETYPEPATTERN_H

#include <stdarg.h>
#include "lx_Export.h"

/**
 * Stores a line type pattern.
 */
class LX_EXPORT PF_LinePattern {
public:
    PF_LinePattern(int count ...) {
        va_list ap;
        int i=0;
        num = count;

        va_start(ap, count);
        pattern = new double[num];
        for (i=0; i<count; i++) {
            pattern[i] = va_arg(ap, double);
        }
        va_end(ap);
    }

    ~PF_LinePattern() {
        delete[] pattern;
    }

public:
    double* pattern;
    int num;
};

// Create line patterns
static PF_LinePattern patternSolidLine(1, 10.0);

static PF_LinePattern patternDotLine(2, 0.1, -6.2);
static PF_LinePattern patternDotLine2(2, 0.1, -3.1);
static PF_LinePattern patternDotLineX2(2, 0.1, -12.4);

static PF_LinePattern patternDashLine(2, 12.0, -6.0);
static PF_LinePattern patternDashLine2(2, 6.0, -3.0);
static PF_LinePattern patternDashLineX2(2, 24.0, -12.0);

static PF_LinePattern patternDashDotLine(4, 12.0, -5.95, 0.1, -5.95);
static PF_LinePattern patternDashDotLine2(4, 6.0, -2.95, 0.1, -2.95);
static PF_LinePattern patternDashDotLineX2(4, 24.0, -11.95, 0.1, -11.95);

static PF_LinePattern patternDivideLine(
    6, 12.0, -5.9, 0.15, -5.9, 0.15, -5.9);
static PF_LinePattern patternDivideLine2(
    6, 6.0, -2.9, 0.15, -2.9, 0.15, -2.9);
static PF_LinePattern patternDivideLineX2(
    6, 24.0, -11.9, 0.15, -11.9, 0.15, -11.9);
	
static PF_LinePattern patternCenterLine(4, 32.0, -6.0, 6.0, -6.0);
static PF_LinePattern patternCenterLine2(4, 16.0, -3.0, 3.0, -3.0);
static PF_LinePattern patternCenterLineX2(4, 64.0, -12.0, 12.0, -12.0);

static PF_LinePattern patternBorderLine(
	6, 12.0, -6.0, 12.0, -5.95, 0.1, -5.95);
static PF_LinePattern patternBorderLine2(
	6, 6.0, -3.0, 6.0, -2.95, 0.1, -2.95);
static PF_LinePattern patternBorderLineX2(
	6, 24.0, -12.0, 24.0, -11.95, 0.1, -11.95);

static PF_LinePattern patternBlockLine(2, 0.5, -0.5);
static PF_LinePattern patternSelected(2, 1.0, -3.0);

#endif
